<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Projector - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
	<h1 translate="no">Projector</h1>
		<section>
			<header>
				<div class="class-description"><p>This class can project a given scene in 3D space into a 2D representation
used for rendering with a 2D API. <code>Projector</code> is currently used by <a href="SVGRenderer.html">SVGRenderer</a>
and was previously used by the legacy <code>CanvasRenderer</code>.</p></div>
			</header>
			<article>
				<h2 class="subsection-title">Import</h2>
				<p><span translate="no">Projector</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
				<pre><code class="language-js">import { Projector } from 'three/addons/renderers/Projector.js';</code></pre>
				<div class="container-overview">
					<h2>Constructor</h2>
					<h3 class="name name-method" id="Projector" translate="no">new <a href="#Projector">Projector</a><span class="signature">()</span> </h3>
					<div class="method">
						<div class="description">
							<p>Constructs a new projector.</p>
						</div>
					</div>
				</div>
				<h2 class="subsection-title">Methods</h2>
					<h3 class="name name-method" id="projectScene" translate="no">.<a href="#projectScene">projectScene</a><span class="signature">( scene : <span class="param-type"><a href="Object3D.html">Object3D</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span>, sortObjects : <span class="param-type">boolean</span>, sortElements : <span class="param-type">boolean</span> )</span><span class="type-signature"> : Object</span> </h3>
					<div class="method">
						<div class="description">
							<p>Projects the given scene in 3D space into a 2D representation. The result
is an object with renderable items.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>scene</strong>
									</td>
									<td class="description last">
										<p>A scene or any other type of 3D object.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>camera</strong>
									</td>
									<td class="description last">
										<p>The camera.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>sortObjects</strong>
									</td>
									<td class="description last">
										<p>Whether to sort objects or not.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>sortElements</strong>
									</td>
									<td class="description last">
										<p>Whether to sort elements (faces, lines and sprites) or not.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The projected scene as renderable objects.</dt>
						</dl>
					</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/Projector.js" translate="no" target="_blank" rel="noopener">examples/jsm/renderers/Projector.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>